<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        let st1='abcdef'
        let str='abcdef'
        let st2='ABCDEF'
        let st3='abcdEf'
        console.log(str.split('c'))
        //[ab,def]
        console.log(str.split(''))
        //[a,b,c,d,e,f]
        console.log(str.split('',4))
        //[a,b,c,d]
        console.log(st1.slice(1,6))
        console.log(st1.slice(3))
        console.log(st1.slice(3,5))
        console.log(st1.slice(5))
        console.log(st2.toLowerCase())
        console.log(st3.toUpperCase())
        // 1.split()方法用于把一个字符串分割成字符串数组
        //2.slice()方法可从已有的数组中返回选定的元素
        //3.toUppercase()方法用于把字符串转换为大写
        //4.toLowercase()方法用于把字符串转换为小写
    </script>
</body>
</html>